library(dplyr)
library(sf)
library(readr)
library(mapview)
mapviewOptions(fgb=FALSE)
library(Rspatialworkshop)
library(ggplot2)
library(leaflet)
library(httr)
Just to show scope of different things we can do linking to REST Services as well - here are links to a couple examples- spatial wfs services and accessing arcgis rest services
We can actually use REST services for equivalent WMS layers we displayed in maps above! See National Map Services page
We can get a listing of all ESRI REST services here
url <- parse_url("https://services.arcgis.com/P3ePLMYs2RVChkJx/arcgis/rest/services")
url$path <- paste(url$path, "Native_Lands_New/FeatureServer/2/query", sep = "/")
url$query <- list(where = "1=1",
outFields = "*",
returnGeometry = "true",
f = "geojson")
request <- build_url(url)
NativeLand <- read_sf(request)
mapview(NativeLand, col.regions='green',map.types = "OpenStreetMap")